<template>
  <div>
    <h1>产品列表：</h1>
    <hr>
    <Products></Products>
    <h1>购物车：</h1>
    <hr>
    <Carts></Carts>
    <hr>
    总价：{{totalPrice}}
  </div>
</template>

<script>
import Products from './cart/Products'
import Carts from './cart/Carts'
import { mapGetters } from 'vuex'
export default {
  components: {
    Products,
    Carts
  },
  computed: {
    ...mapGetters('cart', ['totalPrice'])
  }
}
</script>

<style lang='stylus' scoped>

</style>